<?php
declare(strict_types=1);

namespace SixShop\Lakala;

use SixShop\Core\ExtensionAbstract;
use SixShop\Lakala\Cron\WechatOrderCron;
use SixShop\Lakala\Hook\LakalaHook;
use SixShop\Lakala\Hook\OrderHook;
use SixShop\Payment\Contracts\PaymentExtensionInterface;
use SixShop\Payment\Contracts\PaymentProviderInterface;

/**
 * Lakala Payment Extension
 */
class Extension extends ExtensionAbstract implements PaymentExtensionInterface
{
    public const string EXTENSION_ID = 'lakala';

    #[\Override] protected function getBaseDir(): string
    {
        return dirname(__DIR__);
    }

    #[\Override] public function getPaymentProvider(): PaymentProviderInterface
    {
        return app(PaymentProvider::class);
    }

    #[\Override] public function getHooks(): array
    {
        return [
            LakalaHook::class,
            OrderHook::class,
        ];
    }

    #[\Override] public function getCronJobs(): array
    {
        return [
            WechatOrderCron::class,
        ];
    }
}